<?php
/**
 * Created by novebeta.
 * Date: 10/21/12
 * Time: 11:19 AM
 */
class AceWidget extends CInputWidget
{
    public $ace;
    public $config;
    public $btnLabel = 'Simpan';
    public $aceMode;
    public $urlSuccess;
    public $urlPost;

    public function run()
    {
//        if (!isset($this->model)) {
//            throw new CHttpException(500, '"model" have to be set!');
//        }
        if (!isset($this->attribute)) {
            throw new CHttpException(500, '"attribute" have to be set!');
        }
        $controller = $this->controller;
        $action = $controller->action;
        $this->render('AceView', array(
            "attribute" => $this->attribute,
            "config" => $this->config,
            'btnLabel' => $this->btnLabel,
            'aceMode' => $this->aceMode,
            'urlSuccess' => $this->urlSuccess,
            'urlPost' => $this->urlPost,
        ));
    }
}
